import request from "@/utils/request";

export function login(data) {
  return request({
    url: `/authorization-server/oauth/token?scope=read&grant_type=password&username=${
      data.username
    }&password=${data.password}`,
    method: "post"
  });
}
//查询当前菜单信息
export function getMenuInfo(token) {
  return request({
    url: "/user/api/menuResource/query/list",
    method: "get"
    //params: { token }
  });
}
//查询当前用户信息
export function getUserInfo() {
  return request({
    url: "/user/api/user/query/curUser",
    method: "get"
  });
}

export function logout() {
  return request({
    url: "/authorization-server/admin/out",
    method: "get"
  });
}
